<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Hello</title>
    <script src="js/vue.js"></script>
</head>

<body>

    <div id="app">
        <h1>{{msg}}</h1>1
    </div>2
    <script>
        /**
         *vue2的实例创建
         **/
        var datamodel = {
            msg: "helloworld",
            message: "hhha"
        }
        new Vue({
            el: "#app",
            data: datamodel
        })
        //改进的vue2实例创建
        var vm = new Vue({
            el: "#app",
            data: {
                msg: "helloworld"
            }
        })
        //Vue渲染js实现
        window.onload = function () {
            x = document.getElementById("app");
            x.innerHTML = "Hello world";
        }
    </script>


</body>

</html>